from flask_restful import fields  # type: ignore
from fields.roles.menu_fields_def import menu_fields
from libs.helper import TimestampField
base_role_fields={
    "id": fields.String,
    "parent_id": fields.String,
    "name": fields.String,
    "remark": fields.String,
    "created_at": TimestampField,
    "created_by": fields.String,
}
role_fields={
    "id": fields.String,
    "parent_id": fields.String,
    "name": fields.String,
    "remark": fields.String,
    "created_at": TimestampField,
    "created_by": fields.String,
    "menus":fields.List(fields.Nested(menu_fields)),
}
role_page_fields = {
    "total": fields.Integer,
    "has_more": fields.Boolean,
    "data": fields.List(fields.Nested(base_role_fields)),
    "error": fields.String,
}

